<?php

class BinarySearchTreeNode extends BinaryTreeNode implements Comparable
{

	private $_key;
	
    public function __construct($key, $value) 
    {
    	$this->_key 	= $key;
    	$this->_value 	= $value;
    }
    
    public function setKey($key)
    {
    	$this->_key = $key;
    }
    
    public function getKey()
    {
    	return $this->_key;
    }
    
    public function compareTo(Comparable $other)
    {
		if($this->_key > $other->_key){
			return 1;
		}else if($this->_key < $other->_key){
			return -1;
		}else{
			return 0;
		}    	
    }
}
?>